package kpetruk.tanks2d.network;

import kpetruk.tanks2d.network.netobjects.ChatMessage;
import kpetruk.tanks2d.network.netobjects.RRBasicString;
import kpetruk.tanks2d.network.netobjects.RRPlayerName;
import kpetruk.tanks2d.network.netobjects.RRUnitPosition;
import kpetruk.tanks2d.network.netobjects.RequestResponce;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.EndPoint;

public class CommonNetwork {
  static public final int tcpPort = 54555;
  static public final int udpPort = 54777;

  public boolean init(EndPoint endPoint){
    Kryo kryo = endPoint.getKryo();
    kryo.register(RequestResponce.class);
    kryo.register(RRPlayerName.class);
    kryo.register(RRBasicString.class);
    kryo.register(RRUnitPosition.class);
    kryo.register(ChatMessage.class);
    return true;
  }
}
